package com.mozai.shopping.mapper;


import com.mozai.shopping.pojo.Activity;
import com.mozai.shopping.utils.bean.CommonQueryBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author wj183
* @description 针对表【activity】的数据库操作Mapper
* @createDate 2024-09-29 08:10:24
* @Entity .pojo.Activity
*/
@Mapper
public interface ActivityMapper{

    /**
     * 新增活动
     * @param activity
     */
    void insert(Activity activity);

    /**
     * 根据id查询活动
     * @param id
     * @return
     */
    Activity selectById(Integer id);

    /**
     * 根据id修改活动
     * @param activity
     * @return
     */
    int updateById(Activity activity);

    /**
     * 分页查询
     * @param record
     * @param query
     * @return
     */
    List<Activity> list4Page ( Activity record, @Param("commonQueryParam") CommonQueryBean query);

    /**
     * 查询总条数
     * @param record
     * @return
     */
    int count(Activity record);
}




